/*
 * Copyright 2008 Nordic Consulting & Development Company
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package pl.ncdc.web.login.client;

import com.google.gwt.junit.client.GWTTestCase;

/**
 * <p>
 * Created on 2008-04-22
 *
 * @author leszekgruchala
 * @version $Id: GwtTestUser.java 198 2009-04-14 16:07:55Z hshsce $
 */
public class GwtTestUser extends GWTTestCase {

	final String m_uid = "userID";
	final String m_fullName = "Foo Boo";

	/**
	 * Test method for {@link pl.ncdc.web.login.client.User#setUid(java.lang.String)}.
	 */
	public final void testSetUid() {
		assertEquals("userID", m_uid);
		assertNotNull("'uid' is null.", m_uid);
		final String uid = m_uid;
		assertSame("Objects are not the same.", m_uid, uid);
		final String newUid = new String("userID");
		assertNotSame(m_uid, newUid);
		assertNotNull(m_uid);
	}

	/**
	 * Test method for {@link pl.ncdc.web.login.client.User#setFullName(java.lang.String)}.
	 */
	public final void testSetFullName() {
		final String anotherFullName = new String("Foo Boo");
		assertEquals(m_fullName, anotherFullName);
		assertEquals(anotherFullName, m_fullName);
		assertNotNull(m_fullName);
		assertNotSame(m_fullName, anotherFullName);
	}

	/**
	 * Test method for {@link pl.ncdc.web.login.client.User#getUid()}.
	 */
	public final void testGetUid() {
		final String uid = "userID";
		assertEquals(m_uid, uid);
		assertSame(m_uid, uid);
		assertEquals(uid, m_uid);
	}

	/**
	 * Test method for {@link pl.ncdc.web.login.client.User#getFullName()}.
	 */
	public final void testGetFullName() {
		final String anotherFullName = "Foo Boo";
		assertEquals(m_fullName, anotherFullName);
		assertSame(m_fullName, anotherFullName);
		assertEquals(anotherFullName, m_fullName);
	}

	@Override
	public String getModuleName() {
		return "pl.ncdc.web.login.Login";
	}

}